<?php

$site_header_url = "header.php";
$index_focus_url = "focus.php";
$index_section_url = "section.php";
$index_link_url = "link.php";
$site_sidebar_url = "sidebar.php";
$site_footer_url = "footer.php";

/**
 * 获取站点顶栏
 */
function get_site_header() {
	global $site_header_url;
	include $site_header_url;
}

/**
 * 获取首页焦点图栏
 */
function get_index_focus() {
	global $index_focus_url;
	include $index_focus_url;
}

/**
 * 获取首页内容栏
 */
function get_index_section() {
	global $index_section_url;
	include $index_section_url;
}

/**
 * 获取首页链接栏
 */
function get_index_link() {
	global $index_link_url;
	include $index_link_url;
}

/**
 * 获取站点边栏
 */
function get_site_sidebar() {
	global $site_sidebar_url;
	include $site_sidebar_url;
}

/**
 * 获取站点低栏
 */
function get_site_footer() {
	global $site_footer_url;
	include $site_footer_url;
}



require_once "mysqlhelper.php";

$mysql = new DB_MySQL();

function dbtest() {
	global $mysql;
	
	$mysql->connect("localhost:3306", "root", "000000", "test");
	$result = $mysql->fetch_all_array("select * from tb");
	$num = 0;
	echo '<table border=1>';
	while ($result[$num]) {
		echo '<tr><td>'.$result[$num]["col"].'</td><td>'.$result[$num]["id"].'</td></tr>';
		$num+=1;
	}
	echo '</table>';
	$mysql->free_result($result);
	$mysql->close();
}

?>